package cn.znzz.cjm.feign;

import cn.znzz.cjm.domain.LoginUser;
import cn.znzz.cjm.dto.TenantEnteringDto;
import cn.znzz.cjm.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class MyFallBackFactory implements FallbackFactory<FeignProviderClient>{
    @Override
    public FeignProviderClient create(Throwable throwable) {
        return new FeignProviderClient() {
            @Override
            public AjaxResult entering(LoginUser loginUser) {
                return AjaxResult.me().setSuccess(false).setMessage("入驻失败");
            }
        };
    }
}
